/**
 * 
 */
package fpt.pits.blo;

import fpt.pits.dao.DepartmentInfoDAO;
import fpt.pits.dao.ProjectApplicationInfoDAO;
import fpt.pits.dao.ProjectDatabaseInfoDAO;
import fpt.pits.dao.ProjectExpInfoDAO;
import fpt.pits.dao.ProjectFrameworkInfoDAO;
import fpt.pits.dao.ProjectInfoDAO;
import fpt.pits.dao.ProjectLanguageInfoDAO;
import fpt.pits.dao.ProjectTechnologyInfoDAO;
import fpt.pits.dto.ProjectInfo;

/**
 * @author yoyosakura
 *
 */
public class ProjectInfoBLO {
    private ProjectInfoDAO projectDAO = new ProjectInfoDAO();
    private DepartmentInfoDAO departmentDAO = new DepartmentInfoDAO();
    private ProjectApplicationInfoDAO paDAO = new ProjectApplicationInfoDAO();
    private ProjectDatabaseInfoDAO pdDAO = new ProjectDatabaseInfoDAO();
    private ProjectFrameworkInfoDAO pfDAO = new ProjectFrameworkInfoDAO();
    private ProjectLanguageInfoDAO plDAO = new ProjectLanguageInfoDAO();
    private ProjectTechnologyInfoDAO ptDAO = new ProjectTechnologyInfoDAO();
    private ProjectExpInfoDAO peDAO = new ProjectExpInfoDAO();
    
    /**
     * 
     * @param projectName
     * @return
     */
	public ProjectInfo get(String projectName) {
	    ProjectInfo projectInfo = projectDAO.get(projectName);
	    projectInfo.setDepartment(departmentDAO.get(projectInfo.getDepartID()));
	    projectInfo.setPaList(paDAO.getByProjectID(projectInfo.getProjectID()));
	    projectInfo.setPdList(pdDAO.getByProjectID(projectInfo.getProjectID()));
	    projectInfo.setPfList(pfDAO.getByProjectID(projectInfo.getProjectID()));
	    projectInfo.setPlList(plDAO.getByProjectID(projectInfo.getProjectID()));
	    projectInfo.setPtList(ptDAO.getByProjectID(projectInfo.getProjectID()));
	    projectInfo.setPeList(peDAO.getByProjectID(projectInfo.getProjectID()));
	    
	    return projectInfo;
	}
}
